# +----------------------------------------------------------------------
# | Pink [ A modern python web framework ]
# +----------------------------------------------------------------------
# | Copyright (c) 2023 http:#unnnnn.com All rights reserved.
# +----------------------------------------------------------------------
# | Author: chenjianhua <unnnnn@foxmail.com>
# +----------------------------------------------------------------------

from ..response import Response


class RedirectController:
    def __init__(self, url, status):
        self.url = url
        self.status = status

    def redirect(self, response: Response):
        return response.redirect(self.url, status=self.status)
